package objects;

import java.util.ArrayList;

/**
 * @author JJP
 * This is the class pass around between GUI, LOGIC,BACKEN
 * There is no Set method because of safety concern.
 */


public class Result {
	private boolean isSuccessful;
	private ArrayList<Event> eventList;
	private String detail;
	private String error;

	public Result(boolean isSuccessful, ArrayList<Event> eventList, String detail,String error) {
		this.isSuccessful = isSuccessful;
		this.eventList = eventList;
		this.detail = detail;
        this.error=error;
	}

	// if no detail
	public Result(boolean isSuccessful, ArrayList<Event> eventList) {
		this.isSuccessful = isSuccessful;
		this.eventList = eventList;
		this.detail = null;

	}

	public boolean isSuccessful() {
		return isSuccessful;
	}

	public ArrayList<Event> getData() {
		return eventList;
	}

	public String getDetail() {
		return detail;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}
}
